<%--
  Created by IntelliJ IDEA.
  User: SJP
  Date: 2021/6/3
  Time: 9:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
    <title>$Title$</title>
      <%--静态包含 base标签，css样式 Jquery文件--%>
      <%@include file="/pages/common/Header.jsp"%>
      <script type="text/javascript">
          $(function () {
              // ajax请求
              $("#submit").click(function(){
                  // 把参数序列化
                  $.getJSON("http://localhost:8080/Book/ajaxServlet","action=jQuerySerialize&" + $("#form01").serialize(),function (data) {
                      $("#apikey").val(data.interface.apikey);
                      $("#face_group").val(data.interface.face_group);
                      $("#EffectiveTime").val(data.interface.EffectiveTime);
                      $("#secretkey").val(data.interface.secretkey);
                      $("#score").val(data.interface.score);
                      $("#appid").val(data.interface.appid);
                      $("#autostart").val(data.interface.autostart);
                      $("#imagefiles").val(data.interface.imagefiles);
                      $("#lastBrush-score").val(data.lastBrush.score);
                      $("#user_id").val(data.lastBrush.user_id);
                      $("#datetime").val(data.lastBrush.datetime);
                  });
              });
              $("#updata").click(function(){
                  // 把参数序列化
                  $.getJSON("http://localhost:8080/Book/ajaxServlet","action=jQuerySerializeUpdata&" + $("#form02").serialize(),function (data) {

                  });
              });
          });
      </script>
  </head>
  <body>
  <form id="form01" >
      json文件路径<input type="text" name="file" ><br/>
  </form>
  <button id="submit">提交</button><br/>

  <form id="form02" >
      interface：<br/>
      apikey         <input id="apikey"type="text" name="apikey"/><br/>
      face_group     <input id="face_group" type="text" name="face_group" /><br />
      EffectiveTime  <input id="EffectiveTime" type="text" name="EffectiveTime" /><br />
      secretkey      <input id="secretkey" type="text" name="secretkey" /><br />
      score          <input id="score" type="text" name="score"/><br />
      appid          <input id="appid" type="text" name="appid" /><br />
      autostart      <input id="autostart" type="text" name="autostart" /><br />
      imagefiles     <input id="imagefiles" type="text" name="imagefiles" /><br />
      lastBrush：<br/>
      score         <input id="lastBrush-score"type="text" name="lastBrush-score"/><br/>
      user_id       <input id="user_id" type="text" name="user_id" /><br />
      datetime      <input id="datetime" type="text" name="datetime" /><br />
      json文件路径  <input type="text" name="file" ><br/>
  </form>
  <button id="updata">修改</button><br/>
  </body>
</html>
